<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2Vec2 Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structb2_vec2-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2Vec2 Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A 2D column vector.  
 <a href="structb2_vec2.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="b2_math_8h_source.html">b2Math.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9171b31deb83af96872f99689939a12f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9171b31deb83af96872f99689939a12f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a9171b31deb83af96872f99689939a12f">b2Vec2</a> ()</td></tr>
<tr class="memdesc:a9171b31deb83af96872f99689939a12f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor does nothing (for performance). <br/></td></tr>
<tr class="separator:a9171b31deb83af96872f99689939a12f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a2f026420a84bbbc62f3a3de2041d6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8a2f026420a84bbbc62f3a3de2041d6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#aa8a2f026420a84bbbc62f3a3de2041d6">b2Vec2</a> (float32 x, float32 y)</td></tr>
<tr class="memdesc:aa8a2f026420a84bbbc62f3a3de2041d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct using coordinates. <br/></td></tr>
<tr class="separator:aa8a2f026420a84bbbc62f3a3de2041d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c6cbe27cfb29c6dbb29b9a3285b88d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c6cbe27cfb29c6dbb29b9a3285b88d0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a5c6cbe27cfb29c6dbb29b9a3285b88d0">SetZero</a> ()</td></tr>
<tr class="memdesc:a5c6cbe27cfb29c6dbb29b9a3285b88d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set this vector to all zeros. <br/></td></tr>
<tr class="separator:a5c6cbe27cfb29c6dbb29b9a3285b88d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d61640a645e470a50b451307d8e94c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4d61640a645e470a50b451307d8e94c3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a4d61640a645e470a50b451307d8e94c3">Set</a> (float32 x_, float32 y_)</td></tr>
<tr class="memdesc:a4d61640a645e470a50b451307d8e94c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set this vector to some specified coordinates. <br/></td></tr>
<tr class="separator:a4d61640a645e470a50b451307d8e94c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1f648091d3cba00b4c132758fcf4450"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1f648091d3cba00b4c132758fcf4450"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#ab1f648091d3cba00b4c132758fcf4450">operator-</a> () const </td></tr>
<tr class="memdesc:ab1f648091d3cba00b4c132758fcf4450"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negate this vector. <br/></td></tr>
<tr class="separator:ab1f648091d3cba00b4c132758fcf4450"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cb67b5f755b82d40673337a3652d81f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9cb67b5f755b82d40673337a3652d81f"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a9cb67b5f755b82d40673337a3652d81f">operator()</a> (int32 i) const </td></tr>
<tr class="memdesc:a9cb67b5f755b82d40673337a3652d81f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read from and indexed element. <br/></td></tr>
<tr class="separator:a9cb67b5f755b82d40673337a3652d81f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50b39580d9f479e17b23ce3cb8efbac6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a50b39580d9f479e17b23ce3cb8efbac6"></a>
float32 &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a50b39580d9f479e17b23ce3cb8efbac6">operator()</a> (int32 i)</td></tr>
<tr class="memdesc:a50b39580d9f479e17b23ce3cb8efbac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write to an indexed element. <br/></td></tr>
<tr class="separator:a50b39580d9f479e17b23ce3cb8efbac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a590789342e22ac1e7f9c1a63a2778b6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a590789342e22ac1e7f9c1a63a2778b6d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a590789342e22ac1e7f9c1a63a2778b6d">operator+=</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;v)</td></tr>
<tr class="memdesc:a590789342e22ac1e7f9c1a63a2778b6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a vector to this vector. <br/></td></tr>
<tr class="separator:a590789342e22ac1e7f9c1a63a2778b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b48cab4695a979ae40b7613aedc8b17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b48cab4695a979ae40b7613aedc8b17"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a6b48cab4695a979ae40b7613aedc8b17">operator-=</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;v)</td></tr>
<tr class="memdesc:a6b48cab4695a979ae40b7613aedc8b17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtract a vector from this vector. <br/></td></tr>
<tr class="separator:a6b48cab4695a979ae40b7613aedc8b17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7097696dce578322928f4535b34f1c6b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7097696dce578322928f4535b34f1c6b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a7097696dce578322928f4535b34f1c6b">operator*=</a> (float32 a)</td></tr>
<tr class="memdesc:a7097696dce578322928f4535b34f1c6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply this vector by a scalar. <br/></td></tr>
<tr class="separator:a7097696dce578322928f4535b34f1c6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb1c498214b88874fcb07eb6322374da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb1c498214b88874fcb07eb6322374da"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#afb1c498214b88874fcb07eb6322374da">Length</a> () const </td></tr>
<tr class="memdesc:afb1c498214b88874fcb07eb6322374da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of this vector (the norm). <br/></td></tr>
<tr class="separator:afb1c498214b88874fcb07eb6322374da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af66641b887488490e2168bfafc5a7e36"><td class="memItemLeft" align="right" valign="top">float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#af66641b887488490e2168bfafc5a7e36">LengthSquared</a> () const </td></tr>
<tr class="separator:af66641b887488490e2168bfafc5a7e36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adda78c92f318fe53d8a53f9b5cfd8e41"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adda78c92f318fe53d8a53f9b5cfd8e41"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#adda78c92f318fe53d8a53f9b5cfd8e41">Normalize</a> ()</td></tr>
<tr class="memdesc:adda78c92f318fe53d8a53f9b5cfd8e41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert this vector into a unit vector. Returns the length. <br/></td></tr>
<tr class="separator:adda78c92f318fe53d8a53f9b5cfd8e41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafb971cf7cc726f91fc3a8215fb0aa17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aafb971cf7cc726f91fc3a8215fb0aa17"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#aafb971cf7cc726f91fc3a8215fb0aa17">IsValid</a> () const </td></tr>
<tr class="memdesc:aafb971cf7cc726f91fc3a8215fb0aa17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Does this vector contain finite coordinates? <br/></td></tr>
<tr class="separator:aafb971cf7cc726f91fc3a8215fb0aa17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f2c6e60cb5898bc239801bd19e2d619"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f2c6e60cb5898bc239801bd19e2d619"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_vec2.html#a8f2c6e60cb5898bc239801bd19e2d619">Skew</a> () const </td></tr>
<tr class="memdesc:a8f2c6e60cb5898bc239801bd19e2d619"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the skew vector such that dot(skew_vec, other) == cross(vec, other) <br/></td></tr>
<tr class="separator:a8f2c6e60cb5898bc239801bd19e2d619"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a07021c1c08c547868e3cce9c9ef2ea71"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07021c1c08c547868e3cce9c9ef2ea71"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><b>x</b></td></tr>
<tr class="separator:a07021c1c08c547868e3cce9c9ef2ea71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a880f573a9efe402ec207e9d132cb2a43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a880f573a9efe402ec207e9d132cb2a43"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><b>y</b></td></tr>
<tr class="separator:a880f573a9efe402ec207e9d132cb2a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A 2D column vector. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af66641b887488490e2168bfafc5a7e36"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float32 b2Vec2::LengthSquared </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the length squared. For performance, use this instead of <a class="el" href="structb2_vec2.html#afb1c498214b88874fcb07eb6322374da" title="Get the length of this vector (the norm). ">b2Vec2::Length</a> (if possible). </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="b2_math_8h_source.html">b2Math.h</a></li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
